<?php
/**
 * Created by PhpStorm.
 * User: changyifan
 * Date: 2018/3/15
 * Time: 下午3:31
 */

namespace Home\Dao;
use Think\Model\BaseDao;

class ProfessionDao extends BaseDao{
    protected $_map = array(
        'sd_boss_add'      => 'sch_id',
        'de_boss_add'      => 'dept_id',
        'add_noun_id'      => 'pro_id',
        'add_noun_name'    => 'pro_name',
        'tea_boss_add'     => 'tea_id',
        'add_noun_intro'   => 'pro_intro',
        'sd_boss_edit'     => 'sch_id',
        'de_boss_edit'     => 'dept_id',
        'edit_noun_id'     => 'pro_id',
        'edit_noun_name'   => 'pro_name',
        'tea_boss_edit'    => 'tea_id',
        'edit_noun_intro'  => 'pro_intro',
        'delete_noun_id'   => 'pro_id'
    );
    protected $_validate = array(
        array('sch_id','0','请选择所属学院',0,'notequal'),
        array('dept_id','0','请选择所属系部',0,'notequal'),
        array('pro_id','require','专业编号不能为空'),
        array('pro_name','require','专业名称不能为空'),
        array('tea_id','0','请选择负责人',0,'notequal'),
        array('dept_intro','require','专业简介不能为空'),
    );
}